<#macro display_columns type typename>
<@button goto=URL('console/column/create/',category.ID,'/',type)>新增${typename}字段</@button>
<br>
<table class="datatable">
<thead><tr>
	<th>index</th>
	<th>code</th>
	<th>label</th>
	<th>#</th>
</tr></thead>
<tbody>
	<#assign columns=category.getColumnsOf(type)/>
	<#list columns as c>
	<#assign _url_=URL('console/category/columns/', c.ID)/>
	<tr>
		<td>${c.idx}</td>
		<td>${c.code}</td>
		<td>${c.label}</td>
		<td>
			<@button goto=URL('console/column/', c.ID)>编辑</@button>
			<@button goto=S(_url_, "/up")>上移</@button>
			<@button goto=S(_url_, "/down")>下移</@button>
			<@button goto=S(_url_, "/remove")>删除</@button>
		</td>
	</tr>
	</#list>
</tbody>
</table>
</#macro>
